<?php

date_default_timezone_set('Asia/Shanghai');
define('ENV', ini_get('yaf.environ'));
define('RUN_ENV', 'frontend');

define('CORE_PATH', __DIR__ . '/../../');
define('PROJECT_PATH', CORE_PATH . 'Api/');
require CORE_PATH . 'Core/Autoload.php';
Core_Autoload::registerAutoload();
Core_Config::init();

define('APPLICATION_PATH', __DIR__ . '/..');
require APPLICATION_PATH . '/conf/config.' . ENV . '.php';

$application = new Yaf_Application( APPLICATION_PATH . "/conf/application.web.ini");

$application->bootstrap()->run();